# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: opqdonut <joel.kaasinen@gmail.com>

pkgname=emacs-lua-mode
pkgver=20210802
pkgrel=3
pkgdesc="Emacs lua-mode"
arch=('any')
url="https://github.com/immerrr/lua-mode"
license=('GPL')
depends=()
makedepends=('emacs')
install=$pkgname.install
source=(lua-mode-$pkgver.zip::https://github.com/immerrr/lua-mode/zipball/v$pkgver)
sha512sums=('0b92a6d05a9d334f2458ab7b2acdd76bb8ded63fefd347a11d801cf98a501533dd1b53ea47f8b779eaa21facae71f2a0590d7b9dcd986cb20fd2bfd32e25f640')

build() {
  cd "$srcdir"/immerrr-lua-mode-*
  make compile EMACS_BATCH="emacs --batch -Q"
}

package() {
  cd "$srcdir"/immerrr-lua-mode-*
  mkdir -p "$pkgdir"/usr/share/emacs/site-lisp
  cp *.el{c,} "$pkgdir"/usr/share/emacs/site-lisp/
}
